<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditMember1Title}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditMember1Label_userID}" for="userID" />
                    <h:inputText id="userID" value="#{member1Controller.selected.userID}" title="#{bundle.EditMember1Title_userID}" />
                    <h:outputLabel value="#{bundle.EditMember1Label_fullName}" for="fullName" />
                    <h:inputText id="fullName" value="#{member1Controller.selected.fullName}" title="#{bundle.EditMember1Title_fullName}" required="true" requiredMessage="#{bundle.EditMember1RequiredMessage_fullName}"/>
                    <h:outputLabel value="#{bundle.EditMember1Label_email}" for="email" />
                    <h:inputText id="email" value="#{member1Controller.selected.email}" title="#{bundle.EditMember1Title_email}" required="true" requiredMessage="#{bundle.EditMember1RequiredMessage_email}"/>
                    <h:outputLabel value="#{bundle.EditMember1Label_password}" for="password" />
                    <h:inputText id="password" value="#{member1Controller.selected.password}" title="#{bundle.EditMember1Title_password}" required="true" requiredMessage="#{bundle.EditMember1RequiredMessage_password}"/>
                    <h:outputLabel value="#{bundle.EditMember1Label_birthday}" for="birthday" />
                    <h:inputText id="birthday" value="#{member1Controller.selected.birthday}" title="#{bundle.EditMember1Title_birthday}" />
                    <h:outputLabel value="#{bundle.EditMember1Label_sex}" for="sex" />
                    <h:inputText id="sex" value="#{member1Controller.selected.sex}" title="#{bundle.EditMember1Title_sex}" />
                    <h:outputLabel value="#{bundle.EditMember1Label_mobileNo}" for="mobileNo" />
                    <h:inputText id="mobileNo" value="#{member1Controller.selected.mobileNo}" title="#{bundle.EditMember1Title_mobileNo}" />
                    <h:outputLabel value="#{bundle.EditMember1Label_address}" for="address" />
                    <h:inputText id="address" value="#{member1Controller.selected.address}" title="#{bundle.EditMember1Title_address}" />
                    <h:outputLabel value="#{bundle.EditMember1Label_isActive}" for="isActive" />
                    <h:inputText id="isActive" value="#{member1Controller.selected.isActive}" title="#{bundle.EditMember1Title_isActive}" />
                    <h:outputLabel value="#{bundle.EditMember1Label_dateCreated}" for="dateCreated" />
                    <h:inputText id="dateCreated" value="#{member1Controller.selected.dateCreated}" title="#{bundle.EditMember1Title_dateCreated}" />
                    <h:outputLabel value="#{bundle.EditMember1Label_roleID}" for="roleID" />
                    <h:selectOneMenu id="roleID" value="#{member1Controller.selected.roleID}" title="#{bundle.EditMember1Title_roleID}" >
                        <f:selectItems value="#{rolesController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{member1Controller.update}" value="#{bundle.EditMember1SaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditMember1ViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{member1Controller.prepareList}" value="#{bundle.EditMember1ShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditMember1IndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
